package com.mmt.smartloan.util;

import android.content.Context;

import com.mmt.smartloan.BaseApplication;

public class Utils {
    private static Context context = BaseApplication.getInstance().getApplicationContext();
    /**
     * 将dip或dp值转换为px值，保证尺寸大小不变
     *
     * @param dipValue
     * @return
     */
    public static int dip2px(float dipValue) {
        return (int) (dipValue * context.getResources().getDisplayMetrics().density + 0.5f);
    }
}
